3.2.55 \(\int \csc ^3(a+b x) \sec ^4(a+b x) \, dx\) [155]

Optimal. Leaf size=66 \[ -\frac {5 \tanh ^{-1}(\cos (a+b x))}{2 b}+\frac {5 \sec (a+b x)}{2 b}+\frac {5 \sec ^3(a+b x)}{6 b}-\frac {\csc ^2(a+b x) \sec ^3(a+b x)}{2 b} \]

[Out]

-5/2*arctanh(cos(b*x+a))/b+5/2*sec(b*x+a)/b+5/6*sec(b*x+a)^3/b-1/2*csc(b*x+a)^2*sec(b*x+a)^3/b

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {2702, 294, 308, 213} \begin {gather*} \frac {5 \sec ^3(a+b x)}{6 b}+\frac {5 \sec (a+b x)}{2 b}-\frac {5 \tanh ^{-1}(\cos (a+b x))}{2 b}-\frac {\csc ^2(a+b x) \sec ^3(a+b x)}{2 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[a + b*x]^3*Sec[a + b*x]^4,x]

[Out]

(-5*ArcTanh[Cos[a + b*x]])/(2*b) + (5*Sec[a + b*x])/(2*b) + (5*Sec[a + b*x]^3)/(6*b) - (Csc[a + b*x]^2*Sec[a +
 b*x]^3)/(2*b)

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 308

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 2702

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps

\begin {align*} \int \csc ^3(a+b x) \sec ^4(a+b x) \, dx &=\frac {\text {Subst}\left (\int \frac {x^6}{\left (-1+x^2\right )^2} \, dx,x,\sec (a+b x)\right )}{b}\\ &=-\frac {\csc ^2(a+b x) \sec ^3(a+b x)}{2 b}+\frac {5 \text {Subst}\left (\int \frac {x^4}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{2 b}\\ &=-\frac {\csc ^2(a+b x) \sec ^3(a+b x)}{2 b}+\frac {5 \text {Subst}\left (\int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx,x,\sec (a+b x)\right )}{2 b}\\ &=\frac {5 \sec (a+b x)}{2 b}+\frac {5 \sec ^3(a+b x)}{6 b}-\frac {\csc ^2(a+b x) \sec ^3(a+b x)}{2 b}+\frac {5 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{2 b}\\ &=-\frac {5 \tanh ^{-1}(\cos (a+b x))}{2 b}+\frac {5 \sec (a+b x)}{2 b}+\frac {5 \sec ^3(a+b x)}{6 b}-\frac {\csc ^2(a+b x) \sec ^3(a+b x)}{2 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(205\) vs. \(2(66)=132\).
time = 0.30, size = 205, normalized size = 3.11 \begin {gather*} \frac {2 \csc ^8(a+b x) \left (22-40 \cos (2 (a+b x))+13 \cos (3 (a+b x))-30 \cos (4 (a+b x))+13 \cos (5 (a+b x))+15 \cos (3 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )+15 \cos (5 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-15 \cos (3 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )-15 \cos (5 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )+\cos (a+b x) \left (-26-30 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )+30 \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )\right )\right )}{3 b \left (\csc ^2\left (\frac {1}{2} (a+b x)\right )-\sec ^2\left (\frac {1}{2} (a+b x)\right )\right )^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[a + b*x]^3*Sec[a + b*x]^4,x]

[Out]

(2*Csc[a + b*x]^8*(22 - 40*Cos[2*(a + b*x)] + 13*Cos[3*(a + b*x)] - 30*Cos[4*(a + b*x)] + 13*Cos[5*(a + b*x)]
+ 15*Cos[3*(a + b*x)]*Log[Cos[(a + b*x)/2]] + 15*Cos[5*(a + b*x)]*Log[Cos[(a + b*x)/2]] - 15*Cos[3*(a + b*x)]*
Log[Sin[(a + b*x)/2]] - 15*Cos[5*(a + b*x)]*Log[Sin[(a + b*x)/2]] + Cos[a + b*x]*(-26 - 30*Log[Cos[(a + b*x)/2
]] + 30*Log[Sin[(a + b*x)/2]])))/(3*b*(Csc[(a + b*x)/2]^2 - Sec[(a + b*x)/2]^2)^3)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 70, normalized size = 1.06

method result size
derivativedivides \(\frac {\frac {1}{3 \sin \left (b x +a \right )^{2} \cos \left (b x +a \right )^{3}}-\frac {5}{6 \sin \left (b x +a \right )^{2} \cos \left (b x +a \right )}+\frac {5}{2 \cos \left (b x +a \right )}+\frac {5 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{2}}{b}\) \(70\)
default \(\frac {\frac {1}{3 \sin \left (b x +a \right )^{2} \cos \left (b x +a \right )^{3}}-\frac {5}{6 \sin \left (b x +a \right )^{2} \cos \left (b x +a \right )}+\frac {5}{2 \cos \left (b x +a \right )}+\frac {5 \ln \left (\csc \left (b x +a \right )-\cot \left (b x +a \right )\right )}{2}}{b}\) \(70\)
norman \(\frac {\frac {1}{8 b}+\frac {\tan ^{10}\left (\frac {b x}{2}+\frac {a}{2}\right )}{8 b}+\frac {75 \left (\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}-\frac {65 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{12 b}-\frac {55 \left (\tan ^{6}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{8 b}}{\left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right )^{3} \tan \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}}+\frac {5 \ln \left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{2 b}\) \(114\)
risch \(\frac {15 \,{\mathrm e}^{9 i \left (b x +a \right )}+20 \,{\mathrm e}^{7 i \left (b x +a \right )}-22 \,{\mathrm e}^{5 i \left (b x +a \right )}+20 \,{\mathrm e}^{3 i \left (b x +a \right )}+15 \,{\mathrm e}^{i \left (b x +a \right )}}{3 b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{2}}+\frac {5 \ln \left ({\mathrm e}^{i \left (b x +a \right )}-1\right )}{2 b}-\frac {5 \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right )}{2 b}\) \(123\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(b*x+a)^4/sin(b*x+a)^3,x,method=_RETURNVERBOSE)

[Out]

1/b*(1/3/sin(b*x+a)^2/cos(b*x+a)^3-5/6/sin(b*x+a)^2/cos(b*x+a)+5/2/cos(b*x+a)+5/2*ln(csc(b*x+a)-cot(b*x+a)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 73, normalized size = 1.11 \begin {gather*} \frac {\frac {2 \, {\left (15 \, \cos \left (b x + a\right )^{4} - 10 \, \cos \left (b x + a\right )^{2} - 2\right )}}{\cos \left (b x + a\right )^{5} - \cos \left (b x + a\right )^{3}} - 15 \, \log \left (\cos \left (b x + a\right ) + 1\right ) + 15 \, \log \left (\cos \left (b x + a\right ) - 1\right )}{12 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^4/sin(b*x+a)^3,x, algorithm="maxima")

[Out]

1/12*(2*(15*cos(b*x + a)^4 - 10*cos(b*x + a)^2 - 2)/(cos(b*x + a)^5 - cos(b*x + a)^3) - 15*log(cos(b*x + a) +
1) + 15*log(cos(b*x + a) - 1))/b

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 112, normalized size = 1.70 \begin {gather*} \frac {30 \, \cos \left (b x + a\right )^{4} - 20 \, \cos \left (b x + a\right )^{2} - 15 \, {\left (\cos \left (b x + a\right )^{5} - \cos \left (b x + a\right )^{3}\right )} \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) + 15 \, {\left (\cos \left (b x + a\right )^{5} - \cos \left (b x + a\right )^{3}\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 4}{12 \, {\left (b \cos \left (b x + a\right )^{5} - b \cos \left (b x + a\right )^{3}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^4/sin(b*x+a)^3,x, algorithm="fricas")

[Out]

1/12*(30*cos(b*x + a)^4 - 20*cos(b*x + a)^2 - 15*(cos(b*x + a)^5 - cos(b*x + a)^3)*log(1/2*cos(b*x + a) + 1/2)
 + 15*(cos(b*x + a)^5 - cos(b*x + a)^3)*log(-1/2*cos(b*x + a) + 1/2) - 4)/(b*cos(b*x + a)^5 - b*cos(b*x + a)^3
)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{4}{\left (a + b x \right )}}{\sin ^{3}{\left (a + b x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)**4/sin(b*x+a)**3,x)

[Out]

Integral(sec(a + b*x)**4/sin(a + b*x)**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 163 vs. \(2 (58) = 116\).
time = 3.54, size = 163, normalized size = 2.47 \begin {gather*} -\frac {\frac {3 \, {\left (\frac {10 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - 1\right )} {\left (\cos \left (b x + a\right ) + 1\right )}}{\cos \left (b x + a\right ) - 1} + \frac {3 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} - \frac {16 \, {\left (\frac {12 \, {\left (\cos \left (b x + a\right ) - 1\right )}}{\cos \left (b x + a\right ) + 1} + \frac {9 \, {\left (\cos \left (b x + a\right ) - 1\right )}^{2}}{{\left (\cos \left (b x + a\right ) + 1\right )}^{2}} + 7\right )}}{{\left (\frac {\cos \left (b x + a\right ) - 1}{\cos \left (b x + a\right ) + 1} + 1\right )}^{3}} - 30 \, \log \left (\frac {{\left | -\cos \left (b x + a\right ) + 1 \right |}}{{\left | \cos \left (b x + a\right ) + 1 \right |}}\right )}{24 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)^4/sin(b*x+a)^3,x, algorithm="giac")

[Out]

-1/24*(3*(10*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) - 1)*(cos(b*x + a) + 1)/(cos(b*x + a) - 1) + 3*(cos(b*x + a
) - 1)/(cos(b*x + a) + 1) - 16*(12*(cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 9*(cos(b*x + a) - 1)^2/(cos(b*x + a
) + 1)^2 + 7)/((cos(b*x + a) - 1)/(cos(b*x + a) + 1) + 1)^3 - 30*log(abs(-cos(b*x + a) + 1)/abs(cos(b*x + a) +
 1)))/b

________________________________________________________________________________________

Mupad [B]
time = 0.46, size = 60, normalized size = 0.91 \begin {gather*} \frac {-\frac {5\,{\cos \left (a+b\,x\right )}^4}{2}+\frac {5\,{\cos \left (a+b\,x\right )}^2}{3}+\frac {1}{3}}{b\,\left ({\cos \left (a+b\,x\right )}^3-{\cos \left (a+b\,x\right )}^5\right )}-\frac {5\,\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{2\,b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(a + b*x)^4*sin(a + b*x)^3),x)

[Out]

((5*cos(a + b*x)^2)/3 - (5*cos(a + b*x)^4)/2 + 1/3)/(b*(cos(a + b*x)^3 - cos(a + b*x)^5)) - (5*atanh(cos(a + b
*x)))/(2*b)

________________________________________________________________________________________